home *** CD-ROM | disk | FTP | other *** search
- /**************************************************************************\
- $VER: Pager SysOp Out Editor, v5.20 (15-Mar-98) by Dotoran!
- \**************************************************************************/
- options results;signal on SYNTAX;signal on ERROR;signal on IOERR
- a=sourceline(2);parse var a . ", "ver" ("vdate")" .;a=random(,,time("s"))
- tr=transmit;se=sendstring;gc=getchar;gu=getuser;gs=getscratch;mg=maygetchar
- a="rexxsupport.library";if ~show("l",a) then if ~addlib(a,0,-30) then exit
- a='rexxreqtools.library';if ~show('l',a) then if ~addlib(a,0,-30) then exit
- parse source . . fp .;df=left(fp,max(lastpos('/',fp),lastpos(':',fp)))
-
- /* Modify to match your language. Also, rename the Out.??? files as needed */
-
- dtex="Sunday Monday Tuesday Wednesday Thursday Friday Saturday"
-
- call SETUP ; call SCREEN ; call READDATA
-
- START:
- se ""4+row";"word(cols,col)"Hcfo1>o0"
- day=word(days,col);hour=row+((col//2=0)*12)
- rea=hour.day.hour;if rea="" then rea=default
- se "7Hcf"gen" ca"left(rea,67-(length(gen)+1))"cd74H"substr(" ú",avail.day.hour+1,1)
- do until a~="NOCHAR" ; mg ; a=upper(result) ; end ; call CHECK
- if a=d2c(27) then do
- do 2 ; mg ; k=result ; end
- se ""4+row";"word(cols,col)"H "
- if k="A" then do;row=row-1
- if row<1 then do;row=12;col=col-1;if col<1 then col=14;end
- signal START;end
- if k="B" then do;row=row+1
- if row>12 then do;row=1;col=col+1;if col>14 then col=1;end
- signal START;end
- if k="C" then do;col=col+1;if col>14 then col=1;signal START;end
- if k="D" then do;col=col-1;if col<1 then col=14;signal START;end
- end
- if a=d2c(13) then do ; tog.day.hour=~(tog.day.hour)
- av=substr("01",avail.day.hour+1,1)
- tg=substr("05",tog.day.hour+1,1);co=max(av,tg)
- se ""4+row";"word(cols,col)+1"Hz"co"c"substr("eb",(hour.day.hour>"")+1,1)
- tr right(time.mode.hour,3)"z0"4+row";"word(cols,col)"H "
- row=row+1;if row>12 then do;row=1;col=col+1;if col>14 then col=1;end
- signal START
- end
-
- if a=" " then do;reason=hour.day.hour;if reason="" then reason=default
- tr clr;se "7Hc7Reasonc9: z0cer1L1305640 #"reason"}I260 60}r0"
- gu 70;reason=result;save=1
- se clr"7Hc7Apply to cf<caCcf>caurrentc7, cf<cbScf>cbelectedc7, or cf<cdDcf>cdefault c7hourcf(c7scf)c9: "
- gc;a=result
- if a="D" then do;tr "cdDefaultc7.";default=reason;signal START;end
- if a="C" then do;tr "caCurrentc7.";hour.day.hour=reason
- av=substr("01",avail.day.hour+1,1)
- tg=substr("05",tog.day.hour+1,1);co=max(av,tg)
- se ""4+row";"word(cols,col)+1"Hz"co"c"substr("eb",(hour.day.hour>"")+1,1)
- tr right(time.mode.hour,3)"z0"
- signal START;end
- if a="S" then do;tr "cbSelectedc7."clr;se "7Hc7Processingc9: "
- do i=1 to 7;do j=1 to 24
- se left("ca"word(dtex,i)" cb@ c9"time.mode.j,15+3*3)"<f"
- if tog.i.j=1 then hour.i.j=reason;end j;end i;tog.=0
- tr "cbRedrawing c7time display...";call SCREEN2;signal START;end
- tr "c9Abortc7.";signal START
- end
-
- if a="Q" | (a=d2c(27) & k="NOCHAR") then do ; if save then call SAVEDATA
- tr "f110Hc7Exiting cbCNet Pager ceSysAvail c7Editor!";exit;end
- if a="/" then do;mode=~mode;call SCREEN2;signal START;end
- if a="A" then do ; avail.day.hour=~(avail.day.hour)
- av=substr("01",avail.day.hour+1,1);save=1
- tg=substr("05",tog.day.hour+1,1);co=max(av,tg)
- se ""4+row";"word(cols,col)+1"Hz"co"c"substr("eb",(hour.day.hour>"")+1,1)
- tr right(time.mode.hour,3)"z0"4+row";"word(cols,col)"H "
- row=row+1;if row>12 then do;row=1;col=col+1;if col>14 then col=1;end
- signal START ; end
- signal START
-
- READDATA:
- call open(f1,df"Availabilities","r")
- do i=1 to 7;a=readln(f1)
- call open(f2,df"Out."left(word(dtex,i),3),"r")
- do j=1 to 24;hour.i.j=readln(f2);avail.i.j=substr(a,j,1);end j
- call close(f2)
- end i
- call close(f1)
- call open(f1,df"Out.Def","r");default=readln(f1);call close(f1)
- if default="" then default="not available for chatting."
- tr clr;se "7HcbDisplaying data..."
- signal SCREEN2
-
- SAVEDATA:
- tr clr;se "7HcbSaving data..."
- call open(f1,df"Availabilities","w")
- do i=1 to 7;a=""
- call open(f2,df"Out."left(word(dtex,i),3),"w")
- do j=1 to 24
- call writeln(f2,hour.i.j);a=a||avail.i.j
- end j
- call writeln(f1,a)
- call close(f2)
- end i
- call close(f1)
- call open(f1,df"Out.Def","w");call writeln(f1,default);call close(f1)
- tr "hbed!"
- return
-
- SETUP:
- time.="";hour.="";avail.=0;tog.=0;row=1;col=1;day=1;hour=1;clr="7H"copies(" ",68)
- cols="6 10 16 20 26 30 36 40 46 50 56 60 66 70"
- days="1 1 2 2 3 3 4 4 5 5 6 6 7 7";gu 1100461;gen=word("She's He's",result+1)
- h12="12a 1a 2a 3a 4a 5a 6a 7a 8a 9a 10a 11a 12p 1p 2p 3p 4p 5p 6p 7p 8p 9p 10p 11p"
- h24="000 010 020 030 040 050 060 070 080 090 100 110 120 130 140 150 160 170 180 190 200 210 220 230"
- do i=1 to 24;time.1.i=word(h12,i);time.0.i=word(h24,i);end i;save=0
- call open(f1,df"PagerConfigF","r")
- a=readln(f1);parse var a j"|"j"|"j"|"j"|"mode"|"j;call close(f1)
- return
-
- SCREEN:
- tr "f1@4"center("cbCNet Amiga Pagerc6, cf"ver" ceSysOp Out c6/ caAvailability cdEditorc6, cf"ver"c6!",79+10*3)
- tr "cc ÉÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍ»" /* » */
- tr " ºz0car1 SUN r0ccºz0car1 MON r0ccºz0car1 TUE r0ccºz0car1 WED r0ccºz0car1 THU r0ccºz0car1 FRI r0ccºz0car1 SAT r0ccº"
- tr " ÌÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍ͹" /* ¹ */
- do 12 ; tr " ºCºCºCºCºCºCºCº" ; end
- tr " ÌÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍ͹"
- tr " º cbReading data...ccCº"
- tr " ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ"
- tr " cfArrows c7move the o1cf>o0c7, cdENTER c7will z5ceSelect Hoursz0c7, caSPACE c7will define caReasonsc7."
- tr " Times in ceCYAN c7use ceDefault c7reason, while those in cbYELLOW c7are cbCustomizedc7."
- tr " Press `z0car1 / r0c7'(cfslashc7) to toggle cf12c7/cf24 time displayc7, press `z1cb A z0c7' to enable"
- tr " z1cbGlobal SysOp Availabilityz0 c7status, and press cdESC c7to cfSave c7& cdQuit c7editing!"
- return
- SCREEN2:
- do i=1 to 7;do j=1 to 12
- se ""4+j";"i*10-3"Hz"substr("05",tog.i.j+1,1)"z"substr("01",avail.i.j+1,1)"c"substr("eb",(hour.i.j>"")+1,1)right(time.mode.j,3)"z0" ; jj=j+12
- se ""4+j";"4+i*10-3"Hz"substr("05",tog.i.jj+1,1)"z"substr("01",avail.i.jj+1,1)"c"substr("eb",(hour.i.jj>"")+1,1)right(time.mode.jj,3)"z0"
- end j;end i
- return
-
- CHECK:;if ARG() & ARG(1)~="###PANIC" then return ARG(1)
- getcarrier;if result="TRUE" then if ARG() then return ARG(1);else return
- logentry "Lost Carrier!!";bufferflush;exit
- SYNTAX:;ERROR:;IOERR:;e1="n1 Error: "rc" ("errortext(rc)")"
- e2=" Line: "left(sigl,4)"File:";c="`"fp", "ver"'";e2=e2" "c;tr e1;tr e2
- logentry e1;logentry e2;e=strip(translate(sourceline(sigl),"\{",""))
- do while e~="";e3="Source: "left(e,37);tr e3;logentry e3;e=substr(e,38);end
- bufferflush
- /**************************************************************************\
- \****************************************** Frontiers BBS (716)/823-9892 **/
-